<template>
	<view class="app">
		<view class="shopping" v-for="item in orderdetails" :key="item.id">
			<view>
				<image :src="item.goods_image" mode="widthFix"></image>
			</view>
			<view class="center">
				<view class="top">
					<view class="top-title">{{item.goods_name}}</view>
					<view class="zhe">折</view>
				</view>
				<view class="notes">1人份 | 炒菜 </view>
				<view class="footer">
					<view class="number-ordes">x{{item.goods_number}}</view>
					<view class="price">
						<text style="text-decoration:line-through;margin-top: 2rpx;" v-if="false">￥69.90</text>
						<text style="color: #cc0022;margin-left: 16rpx;">￥</text>
						<text class="jiage">{{item.sales_price}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			orderdetails:{
				type:Array,
				default:() =>[]
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.shopping {
		display: flex;
		margin-top: 20rpx;
		image {
			width: 140rpx;
		}
		.center {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			margin-left: 30rpx;
			width: 100%;
			.top {
				font-size: 32rpx;
				display: flex;
				align-items: center;	
				.top-title {
					width: 80%;
					white-space: nowrap;
					/* 禁止文本换行 */
					overflow: hidden;
					/* 隐藏元素中的文本溢出部分 */
					text-overflow: ellipsis;
					/* 在文本溢出时显示省略号 */
				}
				.zhe {
					width: 30rpx;
					height: 30rpx;
					border-radius: 50%;
					background-color: #025E21;
					font-size: 14rpx;
					color: #fff;
					text-align: center;
					line-height: 30rpx;
					margin-left: 10rpx;
				}
				.radio{
					transform: scale(0.8);
					margin-left: 40rpx;
				}
			}
			.notes {
				font-family: PingFang SC;
				font-size: 24rpx;
				font-weight: 400;
				line-height: 28rpx;
				letter-spacing: 0em;
				text-align: left;
				color: #999999;
			}
			.footer {
				display: flex;
				align-items: center;
				justify-content: space-between;
				.number-ordes{
					font-size: 24rpx;
					color: #999;
				}
				.price {
					margin-bottom: 4rpx;
					display: flex;
					align-items: center;
	
					text {
						color: #999999;
						font-size: 24rpx;
					}
	
					.jiage {
						font-size: 34rpx;
						color: #CC0022;
						margin-right: 28rpx;
					}
				}
			}
		}
	}
</style>